home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak Vol E-14
/
Vol E-14.iso
/
games
/
reelgold.swf
/
scripts
/
DefineSprite_106
/
frame_1
/
DoAction.as
Wrap
Text File
|
2014-03-11
|
5KB
|
205 lines
function fSJxxx(tVal)
{
var _loc1_ = tVal;
if(_loc1_ != pJMode)
{
switch(_loc1_)
{
case "on":
if(pOn == true)
{
sJetOn.onSoundComplete = function()
{
sJetLoop.start(0,99);
};
sJetOn.setVolume(70);
sJetOn.start(0,1);
pJMode = _loc1_;
}
break;
case "off":
sJetLoop.stop();
if(pOn == true)
{
sJetOff.setVolume(70);
sJetOff.start(0,1);
pJMode = _loc1_;
}
}
}
}
function fNoise(which)
{
var _loc1_ = which;
if(pOn == true)
{
if(_loc1_ == "click")
{
sTink.start();
}
else if(_loc1_ == "fire")
{
sFire.start();
}
else if(_loc1_ == "twang")
{
sTwang.start();
}
else if(_loc1_ == "pick")
{
sTink2.start();
}
else if(_loc1_ == "hit")
{
sTink3.start();
}
else if(_loc1_ == "pickhit")
{
sTink3.start();
sFall.start();
}
else if(_loc1_ == "pickup")
{
sPickup2.start();
}
else if(_loc1_ == "newgold")
{
sPickup.start();
}
else if(_loc1_ == "end")
{
sEndMusic.start();
}
else if(_loc1_ == "bell")
{
sCowbell.start();
}
}
}
function sWinMusic()
{
if(pOn == true)
{
sDrums.stop();
sLoop.stop();
sLose.stop();
sWin.stop();
sWin.start();
}
}
function sLoseMusic()
{
if(pOn == true)
{
sDrums.stop();
sLoop.stop();
sLose.stop();
sWin.stop();
sLose.start();
}
}
function sMusic()
{
if(pOn == true)
{
sReelGoldLoop.stop();
sReelGoldLoop.setVolume(100);
sReelGoldLoop.start();
sReelGoldLoop.onSoundComplete = function()
{
sReelGoldLoop.start();
};
}
}
function sStopMusic()
{
if(pOn == true)
{
sReelGoldLoop.stop();
}
}
function fMainSoundSwitch(which)
{
var _loc1_ = _root;
if(which == "on")
{
pOn = true;
if(_loc1_.pSection == "menu")
{
sMusic();
}
else if(_loc1_.pSection != "game")
{
if(_loc1_.pSection == "ready")
{
sDrumsMusic();
}
}
}
else
{
sStopMusic();
pOn = false;
}
}
pOn = true;
this.createEmptyMovieClip("insCowbell",1);
var sCowbell = new Sound(this.insCowbell);
sCowbell.attachSound("sCowbell.wav");
sCowbell.setVolume(100);
this.createEmptyMovieClip("insFire",2);
var sFire = new Sound(this.insFire);
sFire.attachSound("sFire.wav");
sFire.setVolume(100);
this.createEmptyMovieClip("insTink",3);
var sTink = new Sound(this.insTink);
sTink.attachSound("sTink.wav");
sTink.setVolume(100);
this.createEmptyMovieClip("insTink2",4);
var sTink2 = new Sound(this.insTink2);
sTink2.attachSound("sTink2.wav");
sTink2.setVolume(100);
this.createEmptyMovieClip("insTink3",5);
var sTink3 = new Sound(this.insTink3);
sTink3.attachSound("sTink3.wav");
sTink3.setVolume(100);
this.createEmptyMovieClip("insTwang",6);
var sTwang = new Sound(this.insTwang);
sTwang.attachSound("sTwang.wav");
sTwang.setVolume(100);
this.createEmptyMovieClip("insReelGoldLoop",7);
var sReelGoldLoop = new Sound(this.insReelGoldLoop);
sReelGoldLoop.attachSound("sReelGoldLoop.wav");
sReelGoldLoop.setVolume(100);
this.createEmptyMovieClip("insPickup",8);
var sPickup = new Sound(this.insPickup);
sPickup.attachSound("sPickup.wav");
sPickup.setVolume(45);
this.createEmptyMovieClip("insFall",9);
var sFall = new Sound(this.insFall);
sFall.attachSound("sFall.wav");
sFall.setVolume(100);
this.createEmptyMovieClip("insEndMusic",10);
var sEndMusic = new Sound(this.insEndMusic);
sEndMusic.attachSound("sEndMusic.wav");
sEndMusic.setVolume(100);
this.createEmptyMovieClip("insJetLoop",11);
var sJetLoop = new Sound(this.insJetLoop);
sJetLoop.attachSound("JetLoop2.wav");
sJetLoop.setVolume(100);
this.createEmptyMovieClip("insJetOn",12);
var sJetOn = new Sound(this.insJetOn);
sJetOn.attachSound("JetStart.wav");
sJetOn.setVolume(100);
this.createEmptyMovieClip("insJetOff",13);
var sJetOff = new Sound(this.insJetOff);
sJetOff.attachSound("JetFinish.wav");
sJetOff.setVolume(100);
this.createEmptyMovieClip("insPickup2",14);
var sPickup2 = new Sound(this.insPickup2);
sPickup2.attachSound("sPickup2.wav");
sPickup2.setVolume(100);
pJMode = "off";
pOn = true;
stop();